if [ -d ".venv" ]; then
  echo "Activating virtual environment..."
  source .venv/bin/activate
else
  echo "Creating and activating virtual environment..."
  python3 -m venv .venv
  source .venv/bin/activate
fi

echo "Installing dependencies..."
pip install -r requirements.txt

echo "Starting main.py..."
python3 main.py